|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
1. general description the lpc82x are an arm cortex-m0+ based, low-cost 32-bit mcu family operating at cpu frequencies of up to 30 mhz. the lpc82x support up to 32 kb of flash memory and 8 kb of sram. the peripheral complement of the lpc82x includes a crc engine, four i 2 c-bus interfaces, up to three usarts, up to tw o spi interfaces, one multi-rate timer, self-wake-up timer, and state-configurable timer with pwm function (sctimer/pwm), a dma, one 12-bit adc and one analog comparator, function-configurable i/o ports through a switch matrix, an input pattern match engine, and up to 29 general-purpose i/o pins. for additional documentation related to the lpc82x parts, see section 18 . 2. features and benefits ? system: ? arm cortex-m0+ processor (r evision r0p1), running at frequencies of up to 30 mhz with single-cycle multiplier and fast single-cycle i/o port. ? arm cortex-m0+ built-in nested vectored interrupt controller (nvic). ? system tick timer. ? ahb multilayer matrix. ? serial wire debug (swd) with four break points and two watch points. jtag boundary scan (bsdl) supported. ? mtb ? memory: ? up to 32 kb on-chip flash programming memory with 64 byte page write and erase. code read protection (crp) supported. ? 8 kb sram. ? rom api support: ? boot loader. ? on-chip rom apis for adc, spi, i2c, usart, power configuration (power profiles) and integer divide. ? flash in-application programming (iap) and in-system programming (isp). ? digital peripherals: ? high-speed gpio interface connected to th e arm cortex-m0+ io bus with up to 29 general-purpose i/o (gpio) pins with conf igurable pull-up/pu ll-down resistors, programmable open-drain mode, input inverter, and digital filter. gpio direction control supports independent set/clear/toggle of individual bits. ? high-current source output driver (20 ma) on four pins. lpc82x 32-bit arm cortex-m0+ microcontrolle r; up to 32 kb flash and 8 kb sram; 12-bit adc; comparator rev. 1 ? 1 october 2014 product data sheet
lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 2 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? high-current sink driver (20 ma) on two true open-drain pins. ? gpio interrupt generation capability with boolean pattern-matching feature on eight gpio inputs. ? switch matrix for flexible config uration of each i/o pin function. ? crc engine. ? dma with 18 channels and 9 trigger inputs. ? timers: ? state configurable timer (sctimer/pwm ) with input and output functions (including capture and match) for timing and pwm applications. each sctimer/pwm input is multip lexed to allow selecting fr om several input sources such as pins, adc interrupt, or comparator output. ? four channel multi-rate timer (mrt) for repetitive interrupt generation at up to four programmable, fixed rates. ? self-wake-up timer (wkt) clocked from either the irc, a low-power, low-frequency internal oscilla tor, or an external clock input in the a lways-on power domain. ? windowed watchdog timer (wwdt). ? analog peripherals: ? one 12-bit adc with up to 12 input channel s with multiple inte rnal and external trigger inputs and with sample rates of up to 1.2 msamples/s. the adc supports two independent conversion sequences. ? comparator with four input pins and external or internal reference voltage. ? serial peripherals: ? three usart interfaces with pin function s assigned through the switch matrix and one common fractional baud rate generator. ? two spi controllers with pin functions assigned through the switch matrix. ? four i 2 c-bus interfaces. one i2c supports fast-mode plus with 1 mbit/s data rates on two true open-drain pins and listen mode. three i2cs support data rates up to 400 kbit/s on standard digital pins. ? clock generation: ? 12 mhz internal rc oscillator trimmed to 1. 5 % accuracy that can optionally be used as a system clock. ? crystal oscillator with an operating range of 1 mhz to 25 mhz. ? programmable watchdog osc illator with a frequency range of 9.4 khz to 2.3 mhz. ? pll allows cpu operation up to the maximum cpu rate without the need for a high-frequency crystal. may be run from the system oscilla tor, the external clock input, or the internal rc oscillator. ? clock output function with divider that can reflect all internal clock sources. ? power control: ? power consumption in active mode as low as 90 ua/mhz in low-current mode using the irc as the clock source. ? integrated pmu (power management unit) to minimize power consumption. ? reduced power modes: sleep mode, deep-sleep mode, power-down mode, and deep power-down mode. ? wake-up from deep-sleep and power-down modes on activity on usart, spi, and i2c peripherals. ? timer-controlled self wake-up from deep power-down mode. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 3 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? power-on reset (por). ? brownout detect (bod). ? unique device serial number for identification. ? single power supply (1.8 v to 3.6 v). ? operating temperature range -40 c to +105 c. ? available in a tssop20 and hvqfn33 (5x5) package. 3. applications 4. ordering information 4.1 ordering options ? sensor gateways ? simple motor control ? industrial ? portables and wearables ? gaming controllers ? lighting ? 8/16-bit applications ? motor control ? consumer ? fire and security applications ? climate control table 1. ordering information type number package name description version lpc824m201jhi33 hvqfn33 hvqfn: plastic thermal enh anced very thin quad flat package; no leads; 33 terminals; body 5 ? 5 ? 0.85 mm n/a lpc822m101jhi33 hvqfn33 hvqfn: plastic thermal enh anced very thin quad flat package; no leads; 33 terminals; body 5 ? 5 ? 0.85 mm n/a lpc824m201jdh20 tssop20 plastic thin shrink small outline package; 20 leads; body width 4.4 mm sot360-1 lpc822m101jdh20 tssop20 plastic thin shrink small outline package; 20 leads; body width 4.4 mm sot360-1 table 2. ordering options type number flash/ kb sram/ kb usart i 2 c spi adc channels comparator gpio package lpc824m201jhi33 32 8 3 4 2 12 y 29 hvqfn33 lpc822m101jhi33 16 4 3 4 2 12 y 29 hvqfn33 lpc824m201jdh20 32 8 3 4 2 5 y 16 tssop20 lpc822m101jdh20 16 4 3 4 2 5 y 16 tssop20 lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 4 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 5. marking the hvqfn33 packages typically have the following top-side marking: 82xj xx xx yywwxr the tssop20 packages typically have the following top-side marking: lpc82x mx01j xxxxxxxx zzywwxr in the last line, field ?y? or ?yy? states the year the device was manufactured. field ?ww? states the week the device was manufactured during that year. field ?r? states the chip revision. fig 1. tssop20 package marking fig 2. hvqfn33 package marking aaa-014766 terminal 1 index area 1 20 aaa-014382 terminal 1 index area lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 5 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 6. block diagram gray-shaded blocks show peripherals that can provide hardware triggers or fi xed dma requests for dma transfers. fig 3. lpc82x block diagram sram 4/8 kb arm cortex-m0+ test/debug interface flash 16/32 kb high-speed gpio ahb to apb bridge clock generation, power control, system functions reset, clkin clocks and controls lpc82xm aaa-014399 slave slave slave rom slave crc slave master pin interrupts/ pattern match ahb-lite bus irc wdosc bod por spi0/1 usart0/1/2 sda scl sct_pin[3:0] 29 x pio0 29 x wwdt iocon pmu self wake-up timer multi-rate timer i 2 c0/1/2/3 sctimer/ pwm switch matrix sct_out[6:0] comparator xtalin xtalout acmp_o syscon rxd, cts txd, rts acmp_i[4:1] vddcmp adc adc_[11:0] sck, ssel miso, mosi always-on power domain xtal sclk clkout swclk, swd input mux dma lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 6 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 7. pinning information 7.1 pinning fig 4. pin configuration tssop20 package tssop20 pio0_23/adc_3/acmp_i4 pio0_14/adc_2/acmp_i3 pio0_17/adc_9 pio0_0/acmp_i1/tdo pio0_13/adc_10 vrefp pio0_12 vrefn reset/pio0_5 v ss pio0_4/adc_11/wakeup/trst v dd swclk/pio0_3/tck pio0_8/xtalin swdio/pio0_2/tms pio0_9/xtalout pio0_11/i2c0_sda pio0_1/acmp_i2/clkin/tdi pio0_10/i2c0_scl pio0_15 aaa-011391 1 2 3 4 5 6 7 8 9 10 12 11 14 13 16 15 18 17 20 19 fig 5. pin configuration hvqfn33 package aaa-011396 transparent top view pio0_9/xtalout swdio/pio0_2/tms pio0_11/i2c0_sda pio0_8/xtalin swclk/pio0_3/tck v dd pio0_28/wktclkin vrefn pio0_4/adc_11/trst vrefp pio0_5/reset pio0_7/adc_0 pio0_12 pio0_6/adc_1/vddcmp pio0_13/adc_10 pio0_0/acmp_i1/tdo pio0_10/i2c0_scl pio0_16 pio0_27 pio0_26 pio0_25 pio0_24 pio0_15 pio0_1/acmp_i2/clkin/tdi pio0_17/adc_9 pio0_18/adc_8 pio0_19/adc_7 pio0_20/adc_6 pio0_21/adc_5 pio0_22/adc_4 pio0_23/adc_3/acmp_i4 pio0_14/adc_2/acmp_i3 8 17 7 18 6 19 5 20 42 1 3 22 2 23 1 24 9 10 11 12 13 14 15 16 32 31 30 29 28 27 26 25 terminal 1 index area 33 v ss lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 7 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 7.2 pin description the pin description table ta b l e 3 shows the pin functions that are fixed to specific pins on each package. these fixed-pin functions are se lectable through the switch matrix between gpio and the comparator, adc, swd, reset , and the xtal pins. by default, the gpio function is selected except on pins pio0 _2, pio0_3, and pio0_5. jtag functions are available in boundary scan mode only. movable function for the i2c, usart, spi, and sct pin functions can be assigned through the switch matrix to any pin that is not power or ground in place of the pin?s fixed functions. the following exceptions apply: do not assign more than one output to any pin. however, more than one input can be assigned to a pin. once any function is assign ed to a pin, the pin?s gpio functionality is disabled. pin pio0_4 triggers a wake-up from deep power-down mode. if the part must wake up from deep power-down mode via an external pin, do not assign any movable function to this pin. the jtag functions tdo, tdi, tck, tms, and trst are selected on pins pio0_0 to pio0_4 by hardware when the part is in boundary scan mode. table 3. pin description symbol tssop20 hvqfn33 reset state [1] type description pio0_0/acmp_i1/ tdo 19 24 [2] i; pu io pio0_0 ? general-purpose port 0 input/output 0. in isp mode, this is the u0_rxd pin. in boundary scan mode: tdo (test data out). a acmp_i1 ? analog comparator input 1. pio0_1/acmp_i2/ clkin/tdi 12 16 [2] i; pu io pio0_1 ? general-purpose port 0 input/output 1. in boundary scan mode: tdi (test data in). a acmp_i2 ? analog comparator input 2. i clkin ? external clock input. swdio/pio0_2/ tms 87 [4] i; pu io swdio ? serial wire debug i/o. swdio is enabled by default on this pin. in boundary scan mode: tms (test mode select). i/o pio0_2 ? general-purpose port 0 input/output 2. swclk/pio0_3/ tck 76 [4] i; pu i swclk ? serial wire clock. swclk is enabled by default on this pin. in boundary scan mode: tck (test clock). io pio0_3 ? general-purpose port 0 input/output 3. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 8 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller pio0_4/adc_11/ trstn/wakeup 64 [3] i; pu io pio0_4 ? general-purpose port 0 input/output 4. in boundary scan mode: trst (test reset). in isp mode, this pin is the u0_txd pin. this pin triggers a wake-up from deep power-down mode. if the part must wake up from deep power-down mode via an external pin, do not assign any movable function to this pin. this pin should be pulled high externally before entering deep power-down mode. a low-going puls e as short as 50 ns causes the chip to exit deep power-down mode and wakes up the part. a adc_11 ? adc input 11. reset /pio0_5 5 3 [7] i; pu io reset ? external reset input: a low-going pulse as short as 50 ns on this pin resets the device, causing i/o ports and peripherals to take on their default states, and processor execution to begin at address 0. in deep power-down mode, this pin must be pulled high externally. the reset pin can be left unconnected or be used as a gpio or for any movable function if an external reset function is not needed and the deep power-down mode is not used. i pio0_5 ? general-purpose port 0 input/output 5. pio0_6/adc_1/ vddcmp -23 [10] i; pu io pio0_6 ? general-purpose port 0 input/output 6. a adc_1 ? adc input 1. a vddcmp ? alternate reference voltage for the analog comparator. pio0_7/adc_0 - 22 [2] i; pu io pio0_7 ? general-purpose port 0 input/output 7. a adc_0 ? adc input 0. pio0_8/xtalin 14 18 [8] i; pu io pio0_8 ? general-purpose port 0 input/output 8. a xtalin ? input to the oscillator circuit and internal clock generator circuits. input volt age must not exceed 1.95 v. pio0_9/xtalout 13 17 [8] i; pu io pio0_9 ? general-purpose port 0 input/output 9. a xtalout ? output from the oscillator circuit. pio0_10/i2c0_scl 10 9 [6] inactive i; f pio0_10 ? general-purpose port 0 input/output 10 (open-drain). i2c0_scl ? open-drain i 2 c-bus clock input/output. high-current sink if i 2 c fast-mode plus is selected in the i/o configuration register. pio0_11/i2c0_sda 9 8 [6] inactive i; f pio0_11 ? general-purpose port 0 inpu t/output 11 (open-drain). i2c0_sda ? open-drain i 2 c-bus data input/output. high-current sink if i 2 c fast-mode plus is selected in the i/o configuration register. pio0_12 4 2 [4] i; pu io pio0_12 ? general-purpose port 0 in put/output 12. isp entry pin. a low level on this pin during reset starts the isp command handler. pio0_13/adc_10 3 1 [2] i; pu io pio0_13 ? general-purpose port 0 input/output 13. a adc_10 ? adc input 10. table 3. pin description symbol tssop20 hvqfn33 reset state [1] type description lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 9 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller [1] pin state at reset for default function: i = input; ai = anal og input; o = output; pu = internal pull-up enabled (pins pulle d up to full v dd level); ia = inactive, no pull-up/down enabled; f = floati ng. for pin states in the different power modes, see section 14.5 ? pin states in different power modes ? . for termination on unused pins, see section 14.4 ? termination of unused pins ? . [2] 5 v tolerant pin providing standard digita l i/o functions with configurable modes, configurable hysteresis, and analog input . when configured as an analog input, the digital section of t he pin is disabled, and the pin is not 5 v tolerant. pio0_14/ acmp_i3/adc_2 20 25 [2] i; pu io pio0_14 ? general-purpose port 0 input/output 14. a acmp_i3 ? analog comparator common input 3. a adc_2 ? adc input 2. pio0_15 11 15 [5] i; pu io pio0_15 ? general-purpose port 0 input/output 15. pio0_16 - 10 [4] i; pu io pio0_16 ? general-purpose port 0 input/output 16. pio0_17/adc_9 2 32 [2] i; pu io pio0_17 ? general-purpose port 0 input/output 17. a adc_9 ? adc input 9. pio0_18/adc_8 - 31 [2] i; pu io pio0_18 ? general-purpose port 0 input/output 18. a adc_8 ? adc input 8. pio0_19/adc_7 - 30 [2] i; pu io pio0_19 ? general-purpose port 0 input/output 19. a adc_7 ? adc input 7. pio0_20/adc_6 - 29 [2] i; pu io pio0_20 ? general-purpose port 0 input/output 20. a adc_6 ? adc input 6. pio0_21/adc_5 - 28 [2] i; pu io pio0_21 ? general-purpose port 0 input/output 21. a adc_5 ? adc input 5. pio0_22/adc_4 - 27 [2] i; pu io pio0_22 ? general-purpose port 0 input/output 22. a adc_4 ? adc input 4. pio0_23/adc_3/ acmp_i4 126 [2] i; pu io pio0_23 ? general-purpose port 0 input/output 23. a adc_3 ? adc input 3. a acmp_i4 ? analog comparator common input 4. pio0_24 - 14 [5] i; pu io pio0_24 ? general-purpose port 0 input/output 24. pio0_25 - 13 [5] i; pu io pio0_25 ? general-purpose port 0 input/output 25. pio0_26 - 12 [5] i; pu io pio0_26 ? general-purpose port 0 input/output 26. pio0_27 - 11 [5] i; pu io pio0_27 ? general-purpose port 0 input/output 27. pio0_28/ wktclkin -5 [3] i; pu io pio0_28 ? general-purpose port 0 input/output 28. this pin can host an external clock for the self-wake-up timer. to use the pin as a self-wake-up timer clock input, select the external clock in the wake-up timer ctrl register. the external clock input is active in all power modes, including deep power-down. v dd 15 19 - - supply voltage for the i/o pad ring, the core voltage regulator, and the analog peripherals. vss 16 33 - - ground. vrefn 17 20 - - adc negative reference voltage. vrefp 18 21 - - adc positive reference voltage. must be equal or lower than v dd . table 3. pin description symbol tssop20 hvqfn33 reset state [1] type description lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 10 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller [3] 5 v tolerant pad providing digital i/o functions with conf igurable pull-up/pull-down resistor s and configurable hysteresis. this pin is active in deep power-down mode and includes a 20 ns glitch filter (active in all power modes). in deep power-down mode, pulling the wakeup pin low wakes up the chip. the wake-up pin function can be di sabled and the pin can be used for other purposes, if the w kt low-power oscillator is enabl ed for waking up the part from deep power-down mode. see table 16 ? dynamic characteristics: wktclkin pin ? for the wktclkin input. [4] 5 v tolerant pad providing digital i/o functions with conf igurable pull-up/pull-down resistor s and configurable hysteresis; includes high-current output driver. [5] 5 v tolerant pad providing digital i/o functions with conf igurable pull-up/pull-down resistor s and configurable hysteresis. [6] true open-drain pin. i 2 c-bus pins compliant with the i 2 c-bus specification for i 2 c standard mode, i 2 c fast-mode, and i 2 c fast-mode plus. do not use this pad for high-speed appl ications such as spi or usart. the pi n requires an external pull-up to provide out put functionality. when power is switched off, this pin is floating and does not disturb the i2c lines. open-drain configuration ap plies to all functions on this pin. [7] see figure 10 for the reset pad configuration. this pin includes a 20 ns glitch filter (active in all power modes). reset functionality is not available in deep power-down mode. use the wakeup pin to reset the chip and wake up from deep power-down mode. an external pull-up resistor is required on this pin for the deep power-down mode. [8] 5 v tolerant pin providing standard digital i/o functions wi th configurable modes, configur able hysteresis, and analog i/o f or the system oscillator. when configured for xtalin and xtalout, the digital se ction of the pin is disabled, and the pin is not 5 v tolerant . [9] the wktclkin function is enabled in the dpdctrl re gister in the pmu. see the lpc82x user manual. [10] the digital part of this pin is 3 v tolerant pin due to s pecial analog functionality. pin pr ovides standard digital i/o fun ctions with configurable modes, confi gurable hysteresis, and an analog input. when configur ed as an analog input, the digital section of th e pin is disabled. table 4. movable functions (assi gn to pins pio0_0 to pio0_28 through switch matrix) function name type description u0_txd o transmitter output for usart0. u0_rxd i receiver input for usart0. u0_rts o request to send output for usart0. u0_cts i clear to send input for usart0. u0_sclk i/o serial clock input/output for usart0 in synchronous mode. u1_txd o transmitter output for usart1. u1_rxd i receiver input for usart1. u1_rts o request to send output for usart1. u1_cts i clear to send input for usart1. u1_sclk i/o serial clock input/output for usart1 in synchronous mode. u2_txd o transmitter output for usart2. u2_rxd i receiver input for usart2. u2_rts o request to send output for usart1. u2_cts i clear to send input for usart1. u2_sclk i/o serial clock input/output for usart1 in synchronous mode. spi0_sck i/o serial clock for spi0. spi0_mosi i/o master out slave in for spi0. spi0_miso i/o master in slave out for spi0. spi0_ssel0 i/o slave select 0 for spi0. spi0_ssel1 i/o slave select 0 for spi1. spi0_ssel2 i/o slave select 0 for spi2. spi0_ssel3 i/o slave select 0 for spi3. spi1_sck i/o serial clock for spi1. spi1_mosi i/o master out slave in for spi1. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 11 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller spi1_miso i/o master in slave out for spi1. spi1_ssel0 i/o slave select 0 for spi1. spi1_ssel1 i/o slave select 1 for spi1. sct_pin0 i pin input 0 to the sct input multiplexer. sct_pin1 i pin input 1 to the sct input multiplexer. sct_pin2 i pin input 2 to the sct input multiplexer. sct_pin3 i pin input 3 to the sct input multiplexer. sct_out0 o sct output 0. sct_out1 o sct output 1. sct_out2 o sct output 2. sct_out3 o sct output 3. sct_out4 o sct output 4. sct_out5 o sct output 5. i2c1_sda i/o i 2 c1-bus data input/output. i2c1_scl i/o i 2 c1-bus clock input/output. i2c2_sda i/o i 2 c2-bus data input/output. i2c2_scl i/o i 2 c2-bus clock input/output. i2c3_sda i/o i 2 c3-bus data input/output. i2c3_scl i/o i 2 c3-bus clock input/output. adc_pintrig0 i adc external pin trigger input 0. adc_pintrig1 i adc external pin trigger input 1. acmp_o o analog comparator output. clkout o clock output. gpio_int_bmat o output of the pattern match engine. table 4. movable functions (assi gn to pins pio0_0 to pio0_28 through switch matrix) function name type description lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 12 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 8. functional description 8.1 arm cortex-m0+ core the arm cortex-m0+ core runs at an operating frequency of up to 30 mhz using a two-stage pipeline. the core revision is r0p1. integrated in the core are th e nvic and serial wire debug with four breakpoints and two watchpoints. the arm cortex-m0+ core supports a single-cycle i/o enabled port for fast gpio access. the core includes a single-cycle multiplier and a system tick timer. 8.2 on-chip flash program memory the lpc82x contain up to 32 kb of on-c hip flash program memory. the flash memory supports a 64 byte page size with page write and erase. 8.3 on-chip sram the lpc82x contain a total of 8 kb on-chip static ram data memory in two separate sram blocks with one combined clock for both sram blocks. 8.4 on-chip rom the on-chip rom contains the bootloader and the following app lication programming interfaces (apis): ? in-system programming (isp) and in-application programming (iap) support for flash including iap erase page command. ? power profiles for configuring po wer consumption and pll settings ? 32-bit integer division routines ? apis to use the following peripherals: ? spi ? usart ? i2c ? adc 8.5 memory map the lpc82x incorporates seve ral distinct memory regions. figure 6 shows the overall map of the entire address space from the user program viewpoint following reset. the interrupt vector area supports address remapping. the arm private peripheral bu s includes the arm core registers for controlling the nvic, the system tick timer (systick), and the reduced power modes. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 13 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 8.6 nested vectored inte rrupt controller (nvic) the nested vectored interrupt controller (nvi c) is part of the cortex-m0+. the tight coupling to the cpu allows for lo w interrupt latency and efficient processing of late arriving interrupts. 8.6.1 features ? nested vectored interrupt controller is a part of the arm cortex-m0+. fig 6. lpc82x memory mapping apb peripherals 0x4000 4000 0x4000 8000 0x4000 c000 0x4001 0000 0x4001 8000 0x4002 0000 0x4002 8000 0x4003 8000 0x4003 c000 0x4004 0000 0x4004 4000 0x4004 8000 0x4004 c000 0x4005 0000 0x4005 8000 0x4005 c000 0x4006 0000 0x4006 4000 0x4006 8000 0x4008 0000 0x4002 4000 0x4001 c000 0x4001 4000 0x4000 0000 mrt reserved reserved 12-bit adc self wake-up timer reserved wwdt analog comparator pmu 30 - 31 reserved 0 1 2 3 4 5 6 7 8 9 0x4002 c000 0x4003 0000 0x4003 4000 dma trigmux 10 input mux 11 reserved 12 reserved 13 16 15 14 17 18 reserved reserved reserved 0x0000 0000 0 gb 0.5 gb 4 gb 1 gb 0x1fff 0000 0x1fff 3000 0x2000 0000 0x5000 0000 0x5000 4000 0xffff ffff reserved reserved reserved 0x4000 0000 0x4008 0000 apb peripherals crc 0x5000 8000 sctimer/pwm 0x5000 c000 0xa000 0000 gpio 0xa000 4000 0xa000 8000 gpio pint 0x1000 1000 4 kb sram0 0x1001 2000 4 kb sram1 0x1000 0000 lpc82x 0x0000 8000 32 kb on-chip flash 12 kb boot rom 0x1400 0000 0x1400 1000 4 kb mtb registers 0x0000 0000 0x0000 00c0 active interrupt vectors reserved reserved dma reserved flash controller spi0 reserved switch matrix iocon system control (syscon) 19 reserved 0x4005 4000 20 i2c0 21 i2c1 22 23 spi1 24 reserved 0x4006 c000 0x4007 0000 usart0 25 26 usart1 27 usart2 0x4007 4000 28 i2c2 0x4007 8000 29 i2c3 reserved 0xe000 0000 0xe010 0000 private peripheral bus aaa-015072 lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 14 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? tightly coupled interrupt controller provides low interrupt latency. ? controls system exceptions and peripheral interrupts. ? supports 32 vectored interrupts. ? in the lpc82x, the nvic supports vectored interrupts for each of the peripherals and the eight pin interrupts. ? four programmable interrupt priority levels with hardware prio rity level masking. ? software interrupt generation using the arm exceptions svcall and pendsv. ? supports nmi. 8.6.2 interrupt sources each peripheral device has at least one interr upt line connected to the nvic but can have several interrupt flags. individual interrupt flags can also represent more than one interrupt source. 8.7 system tick timer the arm cortex-m0+ includes a 24-bit system tick timer (systick) that is intended to generate a dedicated systick exception at a fixed time interval (typically 10 ms). 8.8 i/o configuration the iocon block controls the configuration of the i/o pins. each digital or mixed digital/analog pin with the pio0_n designato r (except the true open-drain pins pio0_10 and pio0_11) in ta b l e 3 can be configured as follows: ? enable or disable the weak internal pull-up and pull-down resistors. ? select a pseudo open-drain mode. the input cannot be pulled up above v dd . the pins are not 5 v tolerant when v dd is grounded. ? program the input glitch filter with differ ent filter constants using one of the iocon divided clock signals (ioconclkcdiv, see figure 9 ? lpc82x clock generation ? ). you can also bypass the glitch filter. ? invert the input signal. ? hysteresis can be en abled or disabled. ? for pins pio0_10 and pio0_11, select the i2c-mode and output driver for standard digital operation, for i2c standard and fast modes, or for i2c fast mode+. ? the switch matrix setting enables the analog input mode on pins with analog and digital functions. enabling the analog mo de disconnects the digital functionality. remark: the functionality of each i/o pin is flexib le and is determined entirely through the switch matrix. see section 8.9 for details. 8.8.1 standard i/o pad configuration figure 7 shows the possible pin modes for standard i/o pins with analog input function: ? digital output driver with conf igurable open-drain output. ? digital input: weak pull-up resistor (pmos device) enabled/disabled. ? digital input: weak pull-down resistor (nmos device) enabled/disabled. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 15 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? digital input: repeater mode enabled/disabled. ? digital input: programmable input digital filter selectable on all pins. ? analog input: selected through the switch matrix. 8.9 switch matrix (swm) the switch matrix controls the function of each digital or mixed analog/digital pin in a highly flexible way by allowin g to connect many functions like the usart, spi, sct, and i2c functions to any pin that is not power or ground. these functions are called movable functions and are listed in table 4 . functions that need sp ecialized pads like the oscillato r pins xtalin and xtalout can be enabled or disabled through the switch matrix. these functions are called fixed-pin functions and cannot move to other pins. the fixed-pin functions are listed in ta b l e 3 . if a fixed-pin function is disabled, any other mov able function can be assigned to this pin. fig 7. standard i/o pad configuration pin v dd v dd esd v ss esd strong pull-up strong pull-down v dd weak pull-up weak pull-down open-drain enable output enable repeater mode enable pull-up enable pull-down enable select data inverter data output data input analog input swm pinenable for analog input pin configured as digital output driver pin configured as digital input pin configured as analog input programmable digital filter aaa-014392 lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 16 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 8.10 fast general-purpo se parallel i/o (gpio) device pins that are not connec ted to a specific peripheral function are controlled by the gpio registers. pins may be dynamically configured as inputs or outputs. multiple outputs can be set or cleared in one write operation. lpc82x use accelerated gpio functions: ? gpio registers are on the arm cortex-m0+ io bus for fastest possible single-cycle i/o timing, allowing gpio toggling with rates of up to 15 mhz. ? an entire port value can be written in one instruction. ? mask, set, and clear operations are supported for the entire port. all gpio port pins are fixed-pi n functions that are enabled or disabled on the pins by the switch matrix. therefore each gpio port pin is assigned to one specific pin and cannot be moved to another pin. except for pi ns swdio/pio0_2, swclk/pio0_3, and reset /pio0_5, the switch matrix enables the gpio port pin function by default. 8.10.1 features ? bit level port registers allow a single instruction to set and clear any number of bits in one write operation. ? direction control of individual bits. ? all i/o default to gpio inputs with internal pull-up resistors enabled after reset - except for the i 2 c-bus true open-drain pins pio0_10 and pio0_11. ? pull-up/pull-down configuration, repeater, and open-drain modes can be programmed through the iocon block for each gpio pin (see figure 7 ). ? direction (input/output) can be set and cleared individually. ? pin direction bits can be toggled. 8.11 pin interrupt/pattern match engine the pin interrupt block configures up to eight pins from all digital pins for providing eight external interrupts connected to the nvic. the pattern match engine can be used, with software, to create complex state machines based on pin inputs. any digital pin, independently of the function selected through the switch matrix, can be configured through the syscon block as input to the pi n interrupt or pattern match engine. the registers that control the pin interrupt or pattern match engine are on the io+ bus for fast single-cycle access. 8.11.1 features ? pin interrupts ? up to eight pins can be selected from all digital pins as edge- or level-sensitive interrupt requests. each request creates a separate interrupt in the nvic. ? edge-sensitive interrupt pins can interrupt on rising or falling edges or both. ? level-sensitive interrupt pins can be high- or low-active. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 17 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? pin interrupts can wake up the lpc82x from sleep mode, deep-sleep mode, and power-down mode. ? pin interrupt pattern match engine ? up to eight pins can be selected from all digital pins to contribute to a boolean expression. the boolean expression consists of specified levels and/or transitions on various combinations of these pins. ? each minterm (product term) comprising the specified boolean expression can generate its own, dedicated interrupt request. ? any occurrence of a pattern match can be also programmed to generate an rxev notification to the arm cpu. the rxev signal can be connected to a pin. ? the pattern match engine d oes not facilitate wake-up. 8.12 dma controller the dma controller can access all memori es and the usart, spi, i2c, and adc peripherals using dma requests or triggers. dma transfers can also be triggered by internal events like the adc interrupts, the pin interrupts (pinin t0 and pinint1), the sctimer dma requests, and the dma trigger outputs. 8.12.1 features ? 18 channels with each channel connec ted to peripheral request inputs. ? dma operations can be triggered by on-chip events or by two pin interrupts. each dma channel can select one trigger input from 9 sources. ? priority is user selectable for each channel. ? continuous priority arbitration. ? address cache with two entries. ? efficient use of data bus. ? supports single transfers up to 1,024 words. ? address increment options allow packing and/or unpacking data. 8.12.2 dma trigger input mux (trigmux) each dma trigger is connected to a programma ble multiplexer which connects the trigger input to one of multiple trig ger sources. each multiplexe r supports the same trigger sources: the adc sequence interrupts, the sct dma request lines, and pin interrupts pinint0 and pinint1, and the outputs of th e dma triggers 0 and 1 for chaining dma triggers. 8.13 usart0/1/2 all usart functions are movable functions a nd are assigned to pins through the switch matrix. 8.13.1 features ? maximum bit rates of 1.875 mbit/s in asynchronous mode and 10 mbit/s in synchronous mode for usart functions conn ected to all digital pins except the open-drain pins. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 18 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? 7, 8, or 9 data bits and 1 or 2 stop bits ? synchronous mode with master or slave operation. includes data phase selection and continuous clock option. ? multiprocessor/multidrop (9-bit) mode with software address compare. (rs-485 possible with software address detection and transceiver direction control.) ? parity generation and checking: odd, even, or none. ? one transmit and one receive data buffer. ? rts/cts for hardware signaling for automatic flow control. software flow control can be performed using delta cts detect, transmit disable control, and any gpio as an rts output. ? received data and status can optionally be read from a single register ? break generation and detection. ? receive data is 2 of 3 sample "voting". status flag set when one sample differs. ? built-in baud rate generator. ? a fractional rate divider is shared among all uarts. ? interrupts available for receiver ready, tr ansmitter ready, receiver idle, change in receiver break detect, framing error, pari ty error, overrun, underrun, delta cts detect, and receiver sa mple noise detected. ? separate data and flow control loopback modes for testing. ? baud rate clock can also be output in asynchronous mode. ? supported by on-chip rom api. 8.14 spi0/1 all spi functions are movable functions and are assigned to pins through the switch matrix. 8.14.1 features ? maximum data rates of up to 30 mbit/s in master mode and up to 18 mbit/s in slave mode for spi functions connected to all digital pins except the open-drain pins. ? data frames of 1 to 16 bits supported directly. larger frames supported by software. ? master and slave operation. ? data can be transmitted to a slave without the need to read incoming data, which can be useful while setting up an spi memory. ? control information can optionally be writ ten along with data, which allows very versatile operation, including ?any length? frames. ? one slave select input/output with selectable polarity and flexible usage. remark: texas instruments ssi and national microwire modes are not supported. 8.15 i2c-bus interface (i2c0/1/2/3) the i 2 c-bus is bidirectional for inter-ic contro l using only two wires: a serial clock line (scl) and a serial data line (sda). each device is recognized by a unique address and can operate as either a receiver-only device (e.g., an lcd driver) or a transmitter with the lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 19 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller capability to both receive and send information (such as me mory). transmitters and/or receivers can operate in either master or sl ave mode, depending on whether the chip has to initiate a data transfer or is only addressed. the i 2 c is a multi-master bus and can be controlled by more than one bus master. the i2c0-bus functions are fixed-pin function s. all other i2c-bus functions for i2c1/2/3 are movable functions and can be assigned through the switch matrix to any pin. however, only the true open-drain pins provi de the electrical characteristics to support the full i2c-bus specification (see ref. 3 ). 8.15.1 features ? i2c0 supports fast-mode plus with data rates of up to 1 mbit/s in addition to standard and fast modes on two true open-drain pins. ? true open-drain pins provide fail-safe operation: when the power to an i 2 c-bus device is switched off, the sda and scl pins connected to the i 2 c0-bus are floating and do not disturb the bus. ? i2c1/2/3 support standard and fast mode with data rates of up to 400 kbit/s. ? independent master, slave, and monitor functions. ? supports both multi-master and multi-master with slave functions. ? multiple i 2 c slave addresses supported in hardware. ? one slave address can be selectively qualified with a bit mask or an address range in order to respond to multiple i 2 c bus addresses. ? 10-bit addressing supported with software assist. ? supports smbus. 8.16 sctimer/pwm the state configurable timer can perform basic 16-bit and 32-bit timer/counter functions with match outputs and external and inte rnal capture inputs. in addition, the sctimer/pwm can employ up to eight different programmable states, which can change under the control of events, to provide complex timing patterns. the inputs to the sct are multiplexed betwe en movable functions from the switch matrix and internal connections such as the adc threshold compare interrupt, the comparator output, and the arm core signals arm_t xev and debug_halted. the signal on each sct input is selected through the input mux. all outputs of the sct are movable functions and are assigned to pins through the switch matrix. one sct output can also be selected as one of the adc conversion triggers. 8.16.1 features ? each sctimer/pwm supports: ? eight match/capture registers. ? eight events. ? eight states. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 20 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? four inputs. each input is configurable through an input multiplexer to use one of four external pins (connected through the switch matrix) or one of four internal sources. the maximum input signal frequency is 25 mhz. ? six outputs. connected to pins through the switch matrix. ? counter/timer features: ? each sctimer is configurable as two 16-bit counters or one 32-bit counter. ? counters can be clocked by the system clock or selected input. ? configurable as up counters or up-down counters. ? configurable number of match and capture registers. up to eight match and capture registers total. ? upon match create the following events: inte rrupt; stop, limit, halt the timer or change counting direction; toggle outputs. ? counter value can be loaded into capture register triggered by a match or input/output toggle. ? pwm features: ? counters can be used with match regist ers to toggle outputs and create time-proportioned pwm signals. ? up to six single-edge or dual-edge pwm outputs with independent duty cycle and common pwm cycle length. ? event creation features: ? the following conditions define an event: a counter match condition, an input (or output) condition such as a rising or fallin g edge or level, a combination of match and/or input/output condition. ? selected events can limit, halt, start, or stop a counter or change its direction. ? events trigger state changes, output togg les, interrupts, and dma transactions. ? match register 0 can be used as an automatic limit. ? in bidirectional mode, events can be enabled based on the count direction. ? match events can be held until another qualifying event occurs. ? state control features: ? a state is defined by events that can happen in the state while the counter is running. ? a state changes into another state as a result of an event. ? each event can be assigned to one or more states. ? state variable allows sequencing across multiple counter cycles. ? one sctimer match output can be select ed as adc hardware trigger input. 8.16.2 sctimer/pwm input mux (input mux) each input of the sctimer/pwm is connect ed to a programmable multiplexer which allows to connect one of multiple internal or external sources to the input. the available sources are the same for each sctimer/pwm input and can be selected from four pins configured through the switch matrix, t he adc threshold compare interrupt, the comparator output, and the arm core signals ar m_txev and debug_halted. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 21 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 8.17 multi-rate timer (mrt) the multi-rate timer (mrt) provides a repetiti ve interrupt timer with four channels. each channel can be programmed with an independent time interval, and each channel operates independently fr om the other channels. 8.17.1 features ? 31-bit interrupt timer ? four channels independently counting down from individually set values ? bus stall, repeat and one-shot interrupt modes 8.18 windowed watc hdog timer (wwdt) the watchdog timer resets the controller if so ftware fails to service the watchdog timer periodically within a programmable time window. 8.18.1 features ? internally resets chip if not periodically reloaded during the programmable time-out period. ? optional windowed operation requires reload to occur between a minimum and maximum time period, both programmable. ? optional warning interrupt can be generated at a programmable time prior to watchdog time-out. ? enabled by software but requires a hardware reset or a watchdog reset/interrupt to be disabled. ? incorrect feed sequence causes reset or interrupt if enabled. ? flag to indicate watchdog reset. ? programmable 24-bit timer with internal prescaler. ? selectable time period from (t cy(wdclk) ? 256 ? 4) to (t cy(wdclk) ? 2 24 ? 4) in multiples of t cy(wdclk) ? 4. ? the watchdog clock (wdclk) is generated by the dedicated watchdog oscillator (wdosc). 8.19 self-wake-up timer (wkt) the self-wake-up timer is a 32-bit, loadable down counter. writing any non-zero value to this timer automatically enables the counter and launches a count-down sequence. when the counter is used as a wake-up timer, this write can occur prior to entering a reduced power mode. 8.19.1 features ? 32-bit loadable down counter. counter starts automatically when a count value is loaded. time-out generates an interrupt/wake up request. ? the wkt resides in a separate, always-on power domain. ? the wkt supports three clock sources: an external clock on the wktclkin pin, the low-power oscillator, and the irc. the low-pow er oscillator is loca ted in the always-on power domain, so it can be used as the clock source in deep power-down mode. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 22 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? the wkt can be used for waking up the part from any reduced power mode, including deep power-down mode, or for general-purpose timing. 8.20 analog comparator (acmp) the analog comparator with selectable hysteres is can compare voltage levels on external pins and internal voltages. after power-up and after switching the input chan nels of the comparator , the output of the voltage ladder must be allowed to settle to its stable value before it can be used as a comparator reference input. settling times are given in ta b l e 2 4 . the analog comparator output is a movable fu nction and is assigned to a pin through the switch matrix. the comparator inputs and the voltage reference are enabled through the switch matrix. 8.20.1 features ? selectable 0 mv, 10 mv ( ? 5 mv), and 20 mv ( ? 10 mv), 40 mv ( ? 20 mv) input hysteresis. ? two selectable external voltages (v dd or vddcmp on pin pio0_6); fully configurable on either positive or negative input channel. ? internal voltage reference from band gap selectable on either positive or negative input channel. ? 32-stage voltage ladder with the internal reference voltage selectable on either the positive or the negative input channel. fig 8. comparator block diagram 4 32 4 acmp_i[4:1] v dd vddcmp adc_0 internal voltage reference edge detect sync comparator level acmp_o, adc trigger comparator edge nvic comparator analog block comparator digital block aaa-012135 lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 23 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller ? voltage ladder source voltage is selectable from an external pin or the main 3.3 v supply voltage rail. ? voltage ladder can be separa tely powered down for applic ations only requiring the comparator function. ? interrupt outp ut is connected to nvic. ? comparator level output is c onnected to output pin acmp_o. ? one comparator output is internally colle cted to the adc trigger input multiplexer. 8.21 analog-to-digital converter (adc) the adc supports a resolution of 12 bit and fast conversion rates of up to 1.2 msamples/s. sequences of analog-to-digita l conversions can be tr iggered by multiple sources. possible trigger so urces are the pin triggers, the sct output sct_out3, the analog comparator output, and the arm txev. the adc includes a hardware threshold compar e function with zero-crossing detection. remark: for best performance, select vrefp and vrefn at the same voltage levels as v dd and v ss . when selecting vrefp and vrefn different from vdd and vss, ensure that the voltage midpoints are the same: (vrefp-vrefn)/2 + vrefn = v dd /2 8.21.1 features ? 12-bit successive approximation analog to digital converter. ? 12-bit conversion rate of up to 1.2 msamples/s. ? two configurable conversion sequ ences with independent triggers. ? optional automatic high/low threshold comparison and zero-crossing detection. ? power-down mode and low-power operating mode. ? measurement range vrefn to vrefp (not to exceed v dd voltage level). ? burst conversion mode for single or multiple inputs. ? hardware calibration mode. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 24 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller 8.22 clocking and power control 8.22.1 crystal and internal oscillators the lpc82x include four independent oscillators: 1. the crystal oscillator (syso sc) operating at frequencie s between 1 mhz and 25 mhz. 2. the internal rc oscillator (irc) with a fixed frequency of 12 mhz. 3. the internal low-power, low-frequency oscillator with a nominal frequency of 10 khz with 40% accuracy for use with the self-wake-up timer. 4. the dedicated watchdog oscillator (w dosc) with a programmable nominal frequency between 9.4 khz and 2.3 mhz with 40% accuracy. fig 9. lpc82x clock generation system pll watchdog oscillator irc oscillator irc oscillator watchdog oscillator system oscillator mainclksel (main clock select) syspllclksel system pll clock select clock divider sysahbclkdiv ahb clock 0 (core, system; always-on) clock divider uartclkdiv usart0 usart1 usart2 wwdt irc oscillator wkt low-power oscillator wkt watchdog oscillator irc oscillator system oscillator clock divider clkoutdiv clkout pin clkoutsel (clkout clock select) main clock system clock sysahbclkctrl[1:29] (system clock enable) memories and peripherals, peripheral clocks 29 aaa-012136 ioconclkdiv clock divider iocon glitch filter 7 xtalin clkin xtalout syscon pmu fractional rate generator lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 25 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller each oscillator, except th e low-frequency oscillator, c an be used for more than one purpose as required in a particular application. following reset, the lpc82x operates from the irc until switched by software allowing the part to run without any external crystal and the bootloader code to operate at a known frequency. see figure 9 for an overview of the lpc82x clock generation. 8.22.1.1 internal rc oscillator (irc) the irc may be used as the clock source for the wwdt, and/or as the clock that drives the pll and then the cpu. the nominal irc frequency is 12 mhz. the irc is trimmed to 1.5 % accuracy over the entire voltage and temperature range. the irc can be used as a clock source fo r the cpu with or without using the pll. the irc frequency can be boosted to a higher frequency, up to the maximum cpu operating frequency, by the system pll. upon power-up or any chip reset, the lpc82x use the irc as the clock source. software may later switch to one of the other available clock sources. 8.22.1.2 crystal oscillator (sysosc) the crystal oscillator can be used as the clo ck source for the cpu, with or without using the pll. the sysosc operates at frequencies of 1 mhz to 25 mhz. this frequency can be boosted to a higher frequency, up to the maximum cpu operating frequency, by the system pll. 8.22.1.3 internal low-power oscillator and watchdog oscillator (wdosc) the nominal frequency of the wdosc is prog rammable between 9.4 khz and 2.3 mhz. the frequency spread over silicon process variations is ? 40%. the wdosc is a dedicated oscillator for the windowed wwdt. the internal low-power 10 khz ( ? 40% accuracy) oscillator serves as the clock input to the wkt. this oscillator can be configur ed to run in all low-power modes. 8.22.2 clock input an external clock source can be supplied on the selected clkin pin directly to the pll input. when selecting a clock signal for the clki n pin, follow the specifications for digital i/o pins in table 8 ? static characteristics, supply pins ? and table 15 ? dynamic characteristics: i/o pins [1] ? . an 1.8 v external clock source can be su pplied on the xtalin pins to the system oscillator limiting the voltag e of this signal (see section 14.1 ). the maximum frequency for both clock signals is 25 mhz. 8.22.3 system pll the pll accepts an input clock frequency in the range of 10 mhz to 25 mhz. the input frequency is multiplied up to a high frequency with a curren t controlled oscillator (cco). the multiplier can be an integer value from 1 to 32. the cco operates in the range of 156 mhz to 320 mhz, so there is an additional divider in the loop to keep the cco within lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 26 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller its frequency range while the pll is provid ing the desired output frequency. the output divider may be set to divide by 2, 4, 8, or 16 to produce the output clock. since the minimum output divider value is 2, it is insu red that the pll output has a 50 % duty cycle. the pll is turned off and bypassed following a chip reset and may be enabled by software. the program must configure and activate the pll, wait for the pll to lock, and then connect to the pll as a clock source. the pll settling time is nominally 100 ? s. 8.22.4 clock output the lpc82x features a clock output function that routes the irc, the sysosc, the watchdog oscillator, or the main clock to t he clkout function. the clkout function can be connected to any digital pin through the switch matrix. 8.22.5 wake-up process the lpc82x begin operation at power-up by using the irc as the clock source allowing chip operation to resume quickl y. if the sysosc, the external clock source, or the pll are needed by the application, software must en able these features and wait for them to stabilize before they are used as a clock source. 8.22.6 power control the lpc82x supports the arm cortex-m0 sleep mode. the cpu clock rate may also be controlled as needed by changing clock sources, reconfiguring pll values, and/or altering the cpu clock divider value. this allows a trade-off of power versus processing speed based on application requirements. in addition, a register is provided for shutting down the clocks to individual on-chip peripherals, allowing to fine-tune power consumption by eliminating all dynamic power use in any peripherals that are not required for the application. selected peripherals have their ow n clock divider which provides even better power control. 8.22.6.1 power profiles the power consumption in active and sleep modes can be optimized for the application through simple calls to the power profile api. the api is accessible through the on-chip rom. the power configuration routine configures the lpc82x for one of the following power modes: ? default mode corresponding to power configuration after reset. ? cpu performance mode co rresponding to optimize d processing capability. ? efficiency mode corresponding to optimize d balance of current consumption and cpu performance. ? low-current mode corresponding to lowest power consumption. in addition, the power profile includes routines to select the optimal pll settings for a given system clock and pll input clock. 8.22.6.2 sleep mode when sleep mode is entered, the clock to the core is stopped. resumption from the sleep mode does not need any special sequence but re-enabling the clock to the arm core. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 27 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller in sleep mode, execution of instructions is suspended until either a reset or interrupt occurs. peripheral functions continue opera tion during sleep mode and may generate interrupts to cause the processor to resume execution. sleep mode eliminates dynamic power used by the processor itself, memory systems and related controllers, and internal buses. 8.22.6.3 deep-sleep mode in deep-sleep mode, the lpc82x core is in sleep mode and all peripheral clocks and all clock sources are off except fo r the irc and watchdog oscillato r or low-power oscillator if selected. the irc output is disabled. in addit ion, all analog blocks are shut down and the flash is in standby mode. in deep-sleep mode, the application can keep the watchdog oscillator and the bod circuit running for self-timed wake-up and bod protection. the lpc82x can wake up from deep-sleep mode via a reset, digital pins selected as inputs to the pin interrupt block, a watchdog timer interrupt, or an interrupt from the usart (if the usart is configured in synchronous slave mode), the spi, or the i2c blocks (in slave mode). any interrupt used for waking up from deep-sleep mode must be enabled in one of the syscon wake-up enable r egisters and the nvic. deep-sleep mode saves power and allows for short wake-up times. 8.22.6.4 power-down mode in power-down mode, the lpc82x is in sleep mode and all peripheral clocks and all clock sources are off except for wa tchdog oscillator or low-power oscillator if selected. in addition, all analog blocks and the flash are shut down. in power-down mode, the application can keep the watc hdog oscillator and the bod circ uit running for self-timed wake-up and bod protection. the lpc82x can wake up from power-down mode via a reset, digital pins selected as inputs to the pin interrupt block, a watchdog timer interrupt, or an interrupt from the usart (if the usart is configured in synchronous slave mode), the spi, or the i2c blocks (in slave mode). any interrupt used for waking up from power-down mode must be enabled in one of the syscon wake-up enable r egisters and the nvic. power-down mode reduces power consumption compared to deep-sleep mode at the expense of longer wake-up times. 8.22.6.5 deep power-down mode in deep power-down mode, power is shut off to the entire chip except for the wakeup pin and the self-wake-up timer if enabled. four general-purpose registers are available to store information during deep power-down mo de. the lpc82x can wake up from deep power-down mode via the wakeup pin, or without an external signal by using the time-out of the self-wake-up timer (see section 8.19 ). the lpc82x can be prevented from entering deep power-down mode by setting a lock bit in the pmu block. locking out deep power-down mode enables the application to keep the watchdog timer or the bod running at all times. lpc82x all information provided in this document is subject to legal disclaimers. ? nxp semiconductors n.v. 2014. all rights rese rved. product data sheet rev. 1 ? 1 october 2014 28 of 81 nxp semiconductors lpc82x 32-bit arm cortex-m0+ microcontroller when entering deep power-down mode, an external pull-up resistor is required on the wakeup pin to hold it high. pull the reset pin high to prevent it from floating while in deep power-down mode. 8.23 system control 8.23.1 reset reset has four sources on the lpc82x: the reset pin, the watchdog reset, power-on reset (por), and the brownout detection (bod) circuit. the reset pin is a schmitt trigger input pin. assertion of chip reset by any source, once the operating voltage attains a usable level, starts the irc an d initializes the flash controller. a low-going pulse as short as 50 ns resets the part. when the internal reset is removed, the proc essor begins executing at address 0, which is initially the reset vector mapped from the bo ot block. at that point, all of the processor and peripheral registers have been in itialized to predetermined values. in deep power-down mode, an external pull-up resistor is required on the reset pin. 8.23.2 brownout detection the lpc82x includes up to four levels for monitoring the voltage on the v dd pin. if this voltage falls below one of the selected levels, the bod asserts an interrupt signal to the nvic. this signal can be enabled for interrupt in the interrupt enable register in the nvic to cause a cpu interrupt. alternatively, so ftware can monitor the signal by reading a dedicated status register. four threshold levels can be selected to cause a forced reset of the chip. fig 10. reset pad configuration 9 6 6 u h v h w d d d 9 ' ' 9 ' ' 9 ' ' 5 s x ( 6 ' ( 6 ' q v 5 & * / , 7 & |